project(libhumandetect)
file(GLOB HUMAN_DETECT_SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp)
file(GLOB HUMAN_DETECT_HEADERS ${PROJECT_SOURCE_DIR}/include/libhumandetect/*.h)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/../../robot_client/include)
set(MRAA_INSTALL_DIR ${PROJECT_BINARY_DIR}/../../3rdparty/mraa/install/lib/pkgconfig)
find_package(PkgConfig REQUIRED)
set(ENV{PKG_CONFIG_PATH} ${MRAA_INSTALL_DIR}:ENV{PKG_CONFIG_PATH})

pkg_check_modules(MRAA REQUIRED mraa)
include_directories(${MRAA_INCLUDE_DIRS})
message(STATUS "MRAA_INCLUDE_DIRS:${MRAA_INCLUDE_DIRS}")
link_directories(${MRAA_LIBRARY_DIRS})
message(STATUS "MRAA_LIBRARY_DIRS:${MRAA_LIBRARY_DIRS}")
message(STATUS "MRAA_LIBRARIES:${MRAA_LIBRARIES}")
add_library(humandetect ${HUMAN_DETECT_HEADERS} ${HUMAN_DETECT_SOURCES})
target_link_libraries(humandetect rccore)